/*
 * IdentityComonentDefinition.java
 *
 * Created on September 2, 2006, 4:37 PM
 *
 * (C) 2006 R. Alexander Milowski
 */

package org.infoset.component.library;

import java.net.URI;
import javax.naming.Context;
import org.infoset.component.ItemFilterComponentDefinition;
import org.infoset.xml.Document;
import org.infoset.xml.Item;
import org.infoset.xml.ItemDestination;
import org.infoset.xml.Name;
import org.infoset.xml.XMLException;
import org.infoset.xml.filter.ItemFilter;

/**
 *
 * @author alex
 */
public class IdentityComponentDefinition extends ItemFilterComponentDefinition {
   
   public static class Identity implements ItemFilter {
      ItemDestination output = null;
      public void send(Item item) 
         throws XMLException
      {
         if (output!=null) {
            output.send(item);
         }
      }
      public void attach(ItemDestination dest) {
         this.output = dest;
      }
   }
   
   Document staticInput = null;
   URI staticLocation = null;
   /** Creates a new instance of IdentityComonentDefinition */
   public IdentityComponentDefinition(Name name,String vendor,String version,URI vendorLocation) {
      super(name,vendor,version,vendorLocation,Identity.class);
   }
   
}
